#include <zephyr.h>
#include <shell/shell.h>
#include <logging/log.h>

#define STACKSIZE 1024

LOG_MODULE_REGISTER(main, LOG_LEVEL_DBG);

static K_THREAD_STACK_DEFINE(stack, STACKSIZE);
static struct k_thread main_thread;

static void log_thread_fun(void *p1, void *p2, void *p3)
{
    int i = 0;
    while(1){
        LOG_ERR("main err %d", i++);
        LOG_WRN("main wrn");
        LOG_INF("main info");
        LOG_DBG("main dbg");
        k_sleep(1000);
    }
}

void main(void)
{
    k_thread_create(&main_thread, stack, STACKSIZE, log_thread_fun, NULL, NULL,
			NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
    
}
